package com.itheima.Jiuye08;

import java.util.TreeSet;
//(2)创建5个对象装入TreeSet，按照工资从高到底排序输出结果(工资相同，
// 按照年龄从低到高，工资和年龄都相同，
//        按照姓名字典顺序排列)
public class TestEmployee {
    public static void main(String[] args) {
        TreeSet<Employee> ts = new TreeSet<>();
        Employee emp = new Employee("wangwu",23,1200);
        Employee emp1 = new Employee("lishi",24,1300);
        Employee emp2 = new Employee("zhaoliu",25,1400);
        Employee emp3 = new Employee("xiaomin",27,1500);
        Employee emp4 = new Employee("huahua",25,1400);
        ts.add(emp);
        ts.add(emp1);
        ts.add(emp2);
        ts.add(emp3);
        ts.add(emp4);

        System.out.println(ts);
    }
}
